package top.lingchen.blogapi.utils;

import top.lingchen.blogapi.bean.SysUser;

/**
 * @Author 凌宸
 * @create 2021-12-16 下午 8:35
 * @Description
 * @Version 1.0
 */
public class UserThreadLocal {

    private UserThreadLocal(){

    }
    private static final ThreadLocal<SysUser> LOCAL = new ThreadLocal<>();

    public static void put(SysUser sysUser){
        LOCAL.set(sysUser);
    }

    public static SysUser get(){
        return LOCAL.get();
    }

    public static void remove(){
        LOCAL.remove();
    }

}
